/*
 * module_flash.h
 *
 *  Created on: Jun 13, 2010
 *      Author: jmonk
 */

#ifndef MODULE_FLASH_H__
#define MODULE_FLASH_H__

#ifndef __XC__
#include <xccompat.h>
#endif
#include "spi_flash.h"

void module_start_flash(void);
#ifdef __XC__
//int flash_handle_read(chanend os, port spi_ss, spi_master_interface &spi_if);
//int flash_handle_write(chanend os, port spi_ss, spi_master_interface &spi_if);
#else
int flash_handle_read(chanend os, port spi_ss, spi_master_interface *spi_if, mox_msg *msg);
int flash_handle_write(chanend os, port spi_ss, spi_master_interface *spi_if, mox_msg *msg);
int flash_handle_clear(chanend os, port spi_ss, spi_master_interface *spi_if, mox_msg *msg);
#endif




#endif //MODULE_FLASH_H__
